Transformation to Observable and Observer Forms

Harry G. Kwatny

Department of Mechanical Engineering & Mechanics
Drexel University

Introduction

Every locally observable affine system has an 'observable form.' Some can be transformed into a (time-invariant or time-varying) linear from up to output injection, called an 'observer form'. Observer design is facilitated by transforming the system to one of these forms. Here we describe and illustrate the main tools in ProPac that generate these transformations.

Preliminaries

First load the package.

<< ProPac`

View the available functions.

?ProPac`ObserverTools`*

2-Output Example: after Krener & Respondek

Preliminaries

a[x_] := x Sin[x]; c[x_] := (1 + x)/2;

f = {x2, a[x1] + a[x1] x2 + c[x1] x2^2,  
          b[x1] x2};
x = {x1, x2, x3};
h = {x1, x3};

ObservabilityIndices[f, h, x, {u}]

observable form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Observer form

LinearizeToOutputInjection[f, h, x, {u}]

2-Output Example: after Krener & Respondek

Preliminaries

a[x_] := x x;    c[x_] := 
      0;
b[x1_, x3_] := -x3/(1 + x1);

ψ2[x1, x3] = x3  + x1  x3
Eqn = 
      D[ψ2[x1, x3], 
            x1] + (-x3/(1 + x1)) D[ψ2[x1, x3], x3] == 
        0

f = {x2, a[x1] + a[x1] x2 + c[x1] x2^2,  
        b[x1, x3] x2}
x = {x1, x2, x3};
h = {x1, x3};
h = {x1, x3  + x1  x3};

ObservabilityIndices[f, h, x, {u}]

observable form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

SISO Example: after Krener & Respondek (Example 7.3)

Preliminaries

rho[x1_] := x1^3
c[x1_] := 2 D[rho[x1], x1]
f = {x2, x3, 
            c[x1] x2^2/2 + 
              rho[x1] x3} + {{0}, {1 + Exp[x1]}, {1 + x1 + 
                  x2}} . {u};
x = {x1, x2, x3};
h = {x1};

?TaylorLinearize

{A1, B1, C1, D1} = 
      TaylorLinearize[f, h, 
        x, {0, 0, 0}, {u}, {0}]
ObservablePair[A1, C1]

ObservabilityIndices[f, h, x, {u}]

ObservabilityCodistribution [f /. u -> 0, Coefficient[f, u], h, 
      x]

ObservabilityCodistribution [f /. u -> 0, 0 Coefficient[f, u], 
      h, x]

observable form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Simplify[newf + newg u]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Simplify[newf + newg u]

SISO Example: after Krener & Xiao

Preliminaries

f = {-x1 + x2^2, -x1 x2};
x = {x1, x2};
h = {x1};

?TaylorLinearize

{A1, B1, C1, D1} = 
      TaylorLinearize[f, h, x, {0, 0}, {u}, {0}]
ObservablePair[A1, C1]

ObservabilityIndices[f, h, x, {u}]

ObservabilityCodistribution [f /. u -> 0, Coefficient[f, u], h, 
      x]

observable form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Simplify[newf + newg u]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z={z1,z2};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Simplify[newf + newg u]

SISO Example: Hammouri

Preliminaries

f = {Exp[x1+x2]-1+u x1^2,-Exp[x1+x2]+1+u (Exp[x3-x2]-Exp[-x1-x2]-x1^2),-Exp[x1+x2]+1+x1^3 Exp[-x1-x3]-u x1^2};
h=x1;
x={x1,x2,x3};

ObservabilityIndices[f, {h}, x, {u}]

observable form

{Trans, Ind} = ObservableForm[f, {h}, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

newf+newg u

Observer form

Trans = LinearizeToOutputInjection[f, {h}, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]

newf+newg u

SISO Example: Besancon & Bornard

Preliminaries

f = {x2 Exp[-x1], 
          x2^2 Exp[-x1] + 
            x4 Exp[2 x1] u, (x1^2 - x4^2 Exp[2 x1] - 
                x2 x3 Exp[-x1] - 
                x2^2 x4 Exp[-x1]) u, -x2 x4 Exp[-x1] + (x3 + x2 x4) Exp[-x1] u};
h = x1;
x = {x1, x2, x3, x4};

ObservabilityIndices[f, {h}, x, {u}]

observable form

{Trans, Ind} = ObservableForm[f, {h}, x, {u}]

z={z1,z2,z3,z4};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

newf+newg u

Observer form

Trans = LinearizeToOutputInjection[f, {h}, x, {u}]

z={z1,z2,z3,z4};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg}=TransformSystem[f/.u->0,Coefficient[f,u],x,z,Trans,InvTrans]

newf+newg u

Xia & Zeitz example 2

Preliiminaries

f = {x1, x2};
h = {x1^3 + x2^5};
x = {x1, x2};

ObservabilityIndices[f, h, x, {u}]

observable form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z={z1,z2};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]

Xia & Zeitz example 3

Preliminaries

p = 3;
f = {x2^p, x2 u};
h = {x1};
x = {x1, x2};

ObservabilityIndices[f, h, x, {u}]

Observable form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z={z1,z2};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]

Autonomous

p = 3;
f = {x2^p, x2 u[x3], 1};
h = {x1, x3};
x = {x1, x2, x3};

ObservabilityIndices[f, h, x, {uu}]

Trans = LinearizeToOutputInjection[f, {x3, x1}, x, {uu}]

{Trans, Ind} = ObservableForm[f, h, x, {uu}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.uu->0,Coefficient[f,uu],h,x,z,Trans,InvTrans]

Hou & Pugh

Preliminaries

f = {x2, x3 x2, x2};
CC = {{0, 1}, {1, 0}};
h = CC . {x1, x3};
x = {x1, x2, x3};
ObservabilityIndices[f, h, x, {u}]

Observable Form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]
newf+newg u

Observer Form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z = {z1, z2, z3};
InvTrans = InverseTransformation[x, z, Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

Hou & Pugh (without output reordering)

Preliminaries

f = {x2, x3 x2, x2};
h = {x1, x3};
x = {x1, x2, x3};
ObservabilityIndices[f, h, x, {u}]

Observable Form

{Trans, Ind} = ObservableForm[f, h, x, {u}]

z={z1,z2,z3};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]
newf+newg u

Observer Form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

Trans = 
      LinearizeToOutputInjection[newf + newg u, newh, z, {u}]

CC = {{0, 1}, {1, 0}};
Trans = 
      LinearizeToOutputInjection[newf + newg u, CC . newh, 
        z, {u}]

w = {w1, w2, w3};
InvTrans = InverseTransformation[z, w, Trans]

{Newf, Newg, Newh} = 
      TransformSystem[newf /. u -> 0, newg, newh, z, w, Trans, 
        InvTrans]

Two-Output, Not Observable for all Inputs (modified Hammouri)

f = {Exp[x1+x2]-1+u x1^2,-Exp[x1+x2]+1+u (Exp[x3-x2]-Exp[-x1-x2]-x1^2),-Exp[x1+x2]+1+x1^3 Exp[-x1-x3]-u x1^2,x5,x1};
h={x1,x4};
x={x1,x2,x3,x4,x5};

ObservabilityIndices[f, h, x, {u}]

Observable form

{Trans, Ind} = Simplify[ObservableForm[f, h, x, {u}]]

z={z1,z2,z3,z4,z5};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. u -> 0, Coefficient[f, u], h, x, z, Trans, 
        InvTrans]

FullSimplify[newf + newg u]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u}]

z={z1,z2,z3,z4,z5};
InvTrans=InverseTransformation[x,z,Trans]

{newf,newg,newh}=TransformSystem[f/.u->0,Coefficient[f,u],h,x,z,Trans,InvTrans]

FullSimplify[newf + newg u]

Two-Output Three-Input, Not Observable for all Inputs (modified Hammouri)

f = {Exp[x1+x2]-1+u1 x1^2,-Exp[x1+x2]+1+u2 (Exp[x3-x2]-Exp[-x1-x2]-x1^2),-Exp[x1+x2]+1+x1^3 Exp[-x1-x3]-u3 x1^2,x5,x1};
h={x1,x4};
x={x1,x2,x3,x4,x5};

ObservabilityIndices[f, h, x, {u1, u2, u3}]

Observable form

{Trans, Ind} = 
      Simplify[ObservableForm[f, h, x, {u1, u2, u3}]]

z={z1,z2,z3,z4,z5};
InvTrans=InverseTransformation[x,z,Trans]

{newf, newg, newh} = 
      TransformSystem[f /. Inner[Rule, {u1, u2, u3}, {0, 0, 0}, List], 
        Transpose[Map[Coefficient[f, #] &, {u1, u2, u3}]], h, x, z, Trans, 
        InvTrans]

FullSimplify[newf + newg . {u1, u2, u3}]

Observer form

Trans = LinearizeToOutputInjection[f, h, x, {u1, u2, u3}]

z={z1,z2,z3,z4,z5};
InvTrans=InverseTransformation[x,z,Trans]

Map[Coefficient[f, #] &, {u1, u2, u3}]

{newf,newg,newh}=TransformSystem[f/.Inner[Rule,{u1,u2,u3},{0,0,0},List],Transpose[Map[Coefficient[f,#]&,{u1,u2,u3}]],h,x,z,Trans,InvTrans]

FullSimplify[newf + newg . {u1, u2, u3}]